ROX-27695: Collector runtime configuration should be logged #2012
+12
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
It is important for customers to know what the current collector runtime configuration is. While this can be read from the ConfigMap, it is possible that some misconfiguration in the ConfigMap, will cause the actual runtime configuration to be something other than what the user expects. For this reason it is important to log the runtime configuration in collector. Also it may also be important to know the timestamp at which a certain runtime configuration was applied. A ConfigMap will not by itself preserve that history.
In addition to the change mentioned above, a bug is fixed, which made it so that for each test in a group of tests in the same suite, separate collector log files are created. Currently in such cases each test overwrites the log file of the previous test. This change was needed to make the testing of this PR easier.
Checklist
Automated testing
- [ ] Added unit tests- [ ] Added integration tests- [ ] Added regression testsIf any of these don't apply, please comment below.
This is just a change to the logging so no new testing is required.
Testing Performed
Ran
and checked the log files.
The log for
TestRuntimeConfigFileDisable
had the followingand
The log for
TestRuntimeConfigFileEnable
had the followingand
and
The log for
TestRuntimeConfigFileInvalid
had the following